package com.prothink.controller;

import com.prothink.entity.CourseClass;
import com.prothink.entity.RequestData;
import com.prothink.service.JsCourseClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName : JsCourseClassController  //类名
 * @Description : 课程分类  //描述
 * @Author : Zhang //作者
 * @Date: 11/22  21:32
 */
@RestController
@RequestMapping("/courseClass")
public class JsCourseClassController {
    @Autowired
    private JsCourseClassService courseClassService;

    //课程分类数据
    @RequestMapping("/getCourseClass")
    public RequestData getCourseClass(){
        List<CourseClass> courseClassList = courseClassService.getCourseClass();
        if (courseClassList != null){
            System.out.println("课程分类数据："+courseClassList);
            return RequestData.buildSuccess(courseClassList);
        }
        return null;
    }
}
